#ifndef BASETAB_H
#define BASETAB_H

#include <QDebug>
#include <QObject>
#include <QWidget>

class BaseTabWidget;

class BaseTab : public QWidget {
    Q_OBJECT

public:
    explicit BaseTab(QWidget *parent = nullptr);
    virtual ~BaseTab();

    virtual void enter();
    virtual void leave();

    virtual QString tabName() const; // Get the title of tab

    bool active() const;

protected:
    virtual void setTabName(const QString &value); // Set the title of tab
    virtual void updateTabName();

private:
    QString m_tabName;
    bool m_active;

signals:
    void tabNameChanged(const QString &name);
};

#endif // BASETAB_H
